#include <iostream>
#include <string>
#include "myfunctions.h"

using namespace std;

long double function(unsigned int n, unsigned int k);

int main(){

	unsigned int n = (unsigned)getInputAsInt ("Enter an integer: ");
	unsigned int k = (unsigned)getInputAsInt ("Enter an integer: ");
	if((n-k)>1)
	{
		long double result = function(n,k);
		cout<<result<<endl;
	}else cout<<"can't be calculated"<<endl;
	system("pause");
	return 0;
}

long double function(unsigned int n, unsigned int k)
{
	return (long double)factorial(n)/(long double)(factorial(n-k) * factorial(k));
}